﻿// =====================================================================
//
//  This file is part of the Microsoft Dynamics CRM SDK code samples.
//
//  Copyright (C) Microsoft Corporation.  All rights reserved.
//
//  This source code is intended only as a supplement to Microsoft
//  Development Tools and/or on-line documentation.  See these other
//  materials for detailed information regarding Microsoft code samples.
//
//  THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//  PARTICULAR PURPOSE.
//
// =====================================================================
using System.Runtime.Serialization;

namespace Microsoft.Xrm.Sdk.Metadata
{
	[DataContract(Name = "ManagedPropertyMetadata", Namespace = XmlNamespaces.V5.Metadata)]
	public sealed class ManagedPropertyMetadata : MetadataBase
	{
		private string _logicalName;
		private Label _displayName;
		private Label _description;
		private ManagedPropertyType? _managedPropertyType;
		private ManagedPropertyOperation? _operation;
		private ManagedPropertyEvaluationPriority? _evaluationPriority;
		private string _enablesAttributeName;
		private string _enablesEntityName;
		private int? _errorCode;
		private bool? _isPrivate;
		private bool? _isGlobalForOperation;

		public ManagedPropertyMetadata()
			: base()
		{
		}

		[DataMember]
		public string LogicalName
		{
			get { return this._logicalName; }
			internal set { this._logicalName = value; }
		}

		[DataMember]
		public Label DisplayName
		{
			get { return this._displayName; }
			internal set { this._displayName = value; }
		}

		[DataMember]
		public ManagedPropertyType? ManagedPropertyType
		{
			get { return this._managedPropertyType; }
			internal set { this._managedPropertyType = value; }
		}

		[DataMember]
		public ManagedPropertyOperation? Operation
		{
			get { return this._operation; }
			internal set { this._operation = value; }
		}

		[DataMember]
		public bool? IsGlobalForOperation
		{
			get { return this._isGlobalForOperation; }
			internal set { this._isGlobalForOperation = value; }
		}

		[DataMember]
		public ManagedPropertyEvaluationPriority? EvaluationPriority
		{
			get { return this._evaluationPriority; }
			internal set { this._evaluationPriority = value; }
		}

		[DataMember]
		public bool? IsPrivate
		{
			get { return this._isPrivate; }
			internal set { this._isPrivate = value; }
		}

		[DataMember]
		public int? ErrorCode
		{
			get { return this._errorCode; }
			internal set { this._errorCode = value; }
		}

		[DataMember]
		public string EnablesEntityName
		{
			get { return this._enablesEntityName; }
			internal set { this._enablesEntityName = value; }
		}

		[DataMember]
		public string EnablesAttributeName
		{
			get { return this._enablesAttributeName; }
			internal set { this._enablesAttributeName = value; }
		}

		[DataMember]
		public Label Description
		{
			get { return this._description; }
			internal set { this._description = value; }
		}
	}
}
